package cn.heima.com;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class DeteDemo5 {
    public static void main(String[] args) {
        String s = "2021-04-08 12:24:01";
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        LocalDateTime parse = LocalDateTime.parse(s, dateTimeFormatter);
        System.out.println(parse);
    }
}
